<include file="Public:head" />
<link href="__APP__/Application/{$Think.MODULE_NAME}/Public/css/about.css" rel="stylesheet" type="text/css" />
<link href="__APP__/Application/{$Think.MODULE_NAME}/Public/css/login.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/js/jquery/validate.js"></script>
<script type="text/javascript">
    function checkForm(){
        var check = $("input[name=Right]").prop("checked");
        if(check == false){
            showTip('系统提示',"您暂未同意服务条款！",'2',3);
            return false;
        }
    }
    $(function(){
        $("#form").validate({
            errorPlacement: function(error, element){
                var error_td = element.parent('li');
                error_td.find('label.error').hide();
                error_td.children(".focusTips").remove();
                error_td.append(error);
               
            },
            rules : {
                name : {
                    required : true
                },
                schools : {
                    required : true
                },
                contactor : {
                    required : true
                },
                email : {
                    email    : true
                },
                phone : {
                    required    : true
                }
                
            },
            messages : {
                name : {
                    required : '店铺名字不能为空'
                },
                contactor : {
                    required : '联系人不能为空'
                },
                email : {
                    email    : '电子邮箱格式不正确'
                },
              phone  : {
                    required : '电话号码不能为空'
                }
                
            }
        });
    });

</script>
<div id="wrap">
    <div id="school">
        {$type=1|getAreaName}
        <a href="__APP__/?type=clean">[切换位置]</a> <span>/</span> 
        <em id="shop" data-url="{:U('Area/detail',array('id'=>$id))}">商家加盟</em>
    </div>
    <div id="container" class="clearfix shadow">
        <div id="fSidebar">
            <foreach name="lists" item="row">
                <h3>{$row.title}</h3>
                <ul class="fSideNav">
                    <foreach name="row['sub']" item="row2">
                        <li <if condition="$Think.get.id eq $row2['id']">class='active'</if>><a href="{:U('News/lists',array('id'=>$row2['id']))}">{$row2.title}</a></li>
                    </foreach>
                </ul>
            </foreach>
        </div>
        <form id="form" method="post" action="__URL__/join_post" class="common-form" name="form" onsubmit="return checkForm()">

            <div id="about" class="login">
                <h1 class="about-title title-txt">餐厅加盟</h1>
                <span id="join_result" class="br8"></span>    
                <ul>
                    <li>
                        <label><span>*</span>店铺名字：</label>
                        <input name="name" type="text" id="name" autocomplete="off" /><span></span>
                    </li>
                    <li>
                        <label><span>*</span>联系人：</label>
                        <input name="contactor" type="text" id="contactor"  autocomplete="off"/><span></span>
                    </li>
                    <li>
                        <label><span>*</span>联系人电话：</label>
                        <input name="phone" type="text" maxlength="20" id="phone" autocomplete="off" /><span></span>
                    </li>
                    <li>
                        <label><span></span>商家邮箱：</label>
                        <input name="email" type="text" id="email" autocomplete="off"/><span></span>
                    </li>
                    <li>
                        <label>联系人QQ：</label>
                        <input name="qq" type="text" id="qq" autocomplete="off" />
                    </li>
                    <li>
                        <label>餐厅地址：</label>
                        <textarea   maxlength="100" style="width:300px " name="addr" autocomplete="off"></textarea>
                    </li>
                </ul>

                <div id="watchOut">
                    <p class="title">商家须知</p>
                    {$id=12|getSingleField=###,'article','content'}
                </div>
                <p id="agree">
                    <input id="Right" type="checkbox" name="Right" checked="checked" autocomplete="off"/>
                    <label for="Right">我已仔细阅读并同意上述事项</label>
                </p>
                <input type="submit" name="joinUs" value="确认加盟" id="joinUs" />

            </div>
        </form>

    </div>
    <include file="Public:foot" />